<template>
  <div class="main">
    <MeteData :field="field"></MeteData>

    <div class="info-group">
      <div class="info-group">
        <div class="group-title">
          服务器名称 serverName
        </div>
        <div class="group-data">
          {{ field.serverName }}
        </div>
      </div>

      <div class="info-group">
        <div class="group-title">
          版本 version
        </div>
        <div class="group-data">
          {{ field.version }}
        </div>
      </div>

      <div class="info-group">
        <div class="group-title">
          操作 cmd
        </div>
        <div class="group-data">
          {{ cmd }}
        </div>
      </div>

      <div class="info-group">
        <div class="group-title">
          账号 account
        </div>
        <div class="group-data">
          {{ field.account }}
        </div>
      </div>

      <div class="info-group">
        <div class="group-title">
          文件夹名称 dirName
        </div>
        <div class="group-data">
          {{ field.dirName }}
        </div>
      </div>

      <div class="info-group">
        <div class="group-title">
          文件名称 fileName
        </div>
        <div class="group-data">
          {{ field.fileName }}
        </div>
      </div>

      <div class="info-group">
        <div class="group-title">
          读写大小 readWriteSize
        </div>
        <div class="group-data">
          {{ field.readWriteSize }}
        </div>
      </div>

      <div class="info-group">
        <div class="group-title">
          执行结果 result
        </div>
        <div class="group-data">
          {{ field.result }}
        </div>
      </div>

      <div class="info-group">
        <div class="group-title">
          响应码 responseCode
        </div>
        <div class="group-data">
          {{ field.responseCode }}
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import MeteData from './metaData.vue';

export default {
  name: 'yunche_smb',
  props: ['field'],
  components: { MeteData },
  data() {
    return {};
  },
  computed: {
    cmd() {
      let smb_cmd = 'NULL';

      switch (this.field.cmd) {
        case 0:
          smb_cmd = '创建文件';
          break;

        case 0:
          smb_cmd = '创建文件夹';
          break;

        case 0:
          smb_cmd = '读';
          break;

        case 0:
          smb_cmd = '写';
          break;

        case 0:
          smb_cmd = '删除文件';
          break;

        case 0:
          smb_cmd = '删除文件夹';
          break;
      }

      return smb_cmd;
    },
  },
};
</script>

<style scoped>
@import '../basicInfo.css';
</style>
